const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    port: 7070,
    client: {
      overlay: {
        warnings: false,
        errors: true,
      },
    },
    allowedHosts: [
      "localhost", // 允许 localhost
      "127.0.0.1", // 允许 127.0.0.1
      "708d99d5.r3.cpolar.top", // 允许自定义域名
    ],
    proxy: {
      "/api": {
        target: process.env.VUE_APP_BASE_API,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
});
